package com.mathdroid.model.abilities.specs.sniper;

import com.mathdroid.model.abilities.Ability;
import com.mathdroid.model.enums.EDmgType;

public final class WeakeningBlast extends Ability {

	/**
	 * Generated UID.
	 */
	private static final long serialVersionUID = -3785246254652125735L;

	public WeakeningBlast() {
		this.setName("Weakening Blast");
		this.setRequiredTalent("Weakening Blast");
		this.setIconName("defensivecommand");
		this.setResource("Energy");
		this.setCost(10d);
		this.setCooldownMs(15000d);
		this.setDirectDamageType(EDmgType.ENERGY);
		
		this.setStandardHealthPercentMax(0.087);
		this.setStandardHealthPercentMin(0.087);
		this.setAmountModifierPercent(-0.42);
		this.setCoefficient(0.87);
		
		this.setTrainableLevel(40);
	}
	
	@Override
	public String getDescription() {
		return "Deals " + this.getMinDirect() + " - " + this.getMaxDirect() 
			+ " weapon damage and causes the target " +
			"to take 30% additional damage from the Agent's next " +
			"10 poison effects. Lasts 15 seconds.";
	}

	@Override
	public double getMinPeriodic() {
		return 0d;
	}

	@Override
	public double getMaxPeriodic() {
		return 0d;
	}

	@Override
	public double getMinDirect() {
		return
			this.getAmountModifierPercent() 
			* this.getCharStats().getRangedDamagePrimaryMin()
		
			+ this.getCoefficient() 
			* this.getCharStats().getTotalBonusDamageTechForce()
		
			+ this.getStandardHealthPercentMin() 
			* this.getStdDmg();
	}

	@Override
	public double getMaxDirect() {
		return 
			this.getAmountModifierPercent()
			* this.getCharStats().getRangedDamagePrimaryMax()
			
			+ this.getCoefficient() 
			* this.getCharStats().getTotalBonusDamageTechForce()
			
			+ this.getStandardHealthPercentMax() 
			* this.getStdDmg();
	}

}
